package com.sketch.service;

import com.sketch.commom.Result;
import com.sketch.commom.utils.ConversionUtils;
import com.sketch.entity.ActivityConfig;
import com.sketch.entity.dto.ActivityConfigDTO;
import com.sketch.mapper.ActivityConfigMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ActivityConfigService {
    @Resource
    private ActivityConfigMapper activityConfigMapper;
    public Result list(){
        List<ActivityConfig> list = activityConfigMapper.selectList(null);
        List<ActivityConfigDTO> result = ConversionUtils.convertList(list, ActivityConfigDTO.class);
        return Result.success().withData(result);
    }
}
